#include<iostream>
#include<string>
//#include<cstring>
using namespace std;

class Test
{
public:
    int DataLength(int a);
    int DataLength(string s);
    
};

int Test::DataLength(int a)
{
    int j = 0;
    if (a > 0)
    {
        while (a)
        {
            j++;
            a = a / 10;
        }
    }
    return j;
}   
int Test::DataLength(string s)
{
    return s.length();
}

int main()
{
    int a;
    string s;
    getline(cin, s);
    cin >> a;
    Test t;
    cout << t.DataLength(s) << endl;
    cout << t.DataLength(a) << endl;
    return 0;
}